package com.hzit.producer.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.hzit.producer.dao.StudentDao;
import com.hzit.producer.entity.Student;
import com.hzit.producer.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Service(interfaceClass = StudentService.class,version = "1.0.0",timeout = 15000)
@Component
public class StudentServiceImpl implements StudentService {
	@Autowired
	private StudentDao studentDao;

	//1. 查询所有学生
	@Override
	public List<Student> findAll() {
		return studentDao.findAll();
	}

	@Override
	public List<Student> findStudents(String sname, String addr) {
		return studentDao.findBySnameLikeAndAddrLike(sname,addr);
	}
}
